var runTest={
    runTestByInterface:function(interfaceIds){
        var url ="/buildTest/runTestByInterface";
        $.ajax({
            url:url,
            traditional:true,
            data:{
                interfaceIds:interfaceIds
            },success:function (result) {
                if(result.success){
                    var buildTestId =result.data;
                    var url ="/runTest/run?buildTestId="+buildTestId;
                    window.location.href=url;
                    /**
                     * 成功之后回去调用执行控制器
                     * **/
                }else {
                    Ewin.alert(result.msg);
                }
            }
        })
    },
    /**
     * 批量执行测试用例
     * **/
    runTestByCase:function (caseIds) {
        var url ="/buildTest/buildTestByCase";
        $.ajax({
            url:url,
            traditional:true,
            data:{
                caseIds:caseIds
            },success:function (result) {
                if(result.success){
                    var buildTestId =result.data;
                    var url ="/runTest/run?buildTestId="+buildTestId;
                    window.location.href=url;
                    /**
                     * 成功之后回去调用执行控制器
                     * **/
                }else {
                    Ewin.alert(result.msg);
                }
            }
        })
    },
    runTestPlan: function (testPlanId) {
        $.ajax({
            url: "/buildTest/buildTestPlan",
            type: "post", dataType: "json",
            traditional: true, data: {
                testPlanId: testPlanId
            }, success: function (result) {
                if (result.success) {
                    var url = "/runTest/run?buildTestId=" + result.data;
                    window.location.href = url;
                } else {
                    Ewin.alert(result.msg)
                }
            }
        })
    }
};